import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2025-05-21
 * 21:36
 */
public class Main {
    public static void main(String[] args) {
       Scanner scanner=new Scanner(System.in);
       int m=scanner.nextInt();
       int n=scanner.nextInt();
       int m1,n1;
       int count=0;
       int ret=32;
       while(ret--!=0){
           if(m%2!=n%2){
               count++;
           }
           m=m/2;n=n/2;
       }
        System.out.println(count);
    }

}
